﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp2
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("请输入一个整数");
            int a = int.Parse(Console.ReadLine());

            Console.WriteLine("请输入一个整数");
            int b = int.Parse(Console.ReadLine());

            Console.WriteLine("请输入一个运算符");
            string s = Console.ReadLine();

            Calculate cl = new Calculate();
            switch (s)
            {
                case "+":
                    cl = new Jia(a,b) ;
                    break;
                case "-":
                    cl = new Jia(a, b);
                    break;
                case "*":
                    cl = new Jia(a, b);
                    break;
                case "/":
                    cl = new Jia(a, b);
                    break;
                default:
                    break;
            }

            Text2(cl);

        }
        public static  void Text2(Calculate c)
        {
            c.DisplayResult();
        }
    }
}
